package com.example01;

public class LeapYearsTest {
    public static void main(String[] args) {
        leapYearsTset(1899,2046);
    }
    private static void leapYearsTset(int startYear, int endYear) {
        int i;
        for(i = startYear; i <= endYear; i++) {
            if(i % 400 == 0 || (i % 4 == 0 && i % 100 != 0) ) {
                System.out.println(i);
            }
        }
    }
}
